<template>
  <div class="big">
    <div class="top1">
      <!-- <div>欢迎使用shopApp</div> -->


      <!-- 二级路由 -->
      <!-- 如果跳转到/home页，会去找home.vue的内容来替换这里的 <router-view></router-view> -->
      <!-- <router-view></router-view> -->
      <router-view #="{ Component }">
        <keep-alive>
          <component :is="Component"></component>
        </keep-alive>
      </router-view>
    </div>


    <van-tabbar v-model="active">
      <van-tabbar-item replace to="/index" icon="home-o">主页</van-tabbar-item>
      <van-tabbar-item replace to="/cart" icon="search" dot>购物车</van-tabbar-item>
      <van-tabbar-item replace to="/order" icon="friends-o" badge="5">订单</van-tabbar-item>
      <van-tabbar-item replace to="/mine" icon="setting-o" badge="20">我的</van-tabbar-item>
    </van-tabbar>
    <div class="bottom_2"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      active: this.$route.meta.index
    }
  },
}
</script>




<style>
* {
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;

}
</style>


<style scoped>
.text {
  font-size: 42px;
  text-align: center;
}

.big {
  width: 100%;
  height: 667px;
  display: flex;
  flex-direction: column;
  justify-content: start;
  background-color: #f0f0f0;
  margin-bottom: 500px;
}

.big .top1 {

  background-color: #f0f0f0;
  /* border: 1px solid black; */
}

.bottom {
  /* height: 50px; */
  width: 100%;
  display: flex;
  background-color: rgb(241, 241, 241);
  position: fixed;
  bottom: 0px;
  border-top: 1px solid #ddd;
}

.bottom .btnBox {
  flex: 1;
  height: 50px;
  /* border: 1px solid black; */
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.bottom .btnBox a {
  flex: 1;
  text-align: center;
  color: #555;
}

.bottom_2 {
  min-height: 500px;
}
</style>
